package com.zhuangxiaoyan.springboot.jpa.application;

import com.zhuangxiaoyan.springboot.jpa.domian.model.User;
import com.zhuangxiaoyan.springboot.jpa.domian.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * UserApplication
 *
 * @author xjl
 * @version 2025/01/13 23:44
 **/
@Service
public class UserManagerApplication {

    @Autowired
    private UserService userService;

    /**
     * 这一层主要是业务层，相关处理逻辑
     */
    public User userCreateBusiness(User user) {
        return userService.createUser(user);
    }

    /**
     * 这一层主要是业务层，相关处理逻辑
     */
    public List<User> getUserAll() {
        return userService.getAllUsers();
    }
}